import request from '@/utils/request'

// 查询产业地图列表
export function listDealEstateMap(query) {
  return request({
    url: '/map/dealEstateMap/list',
    method: 'get',
    params: query
  })
}

// 查询产业地图详细
export function getDealEstateMap(id) {
  return request({
    url: '/map/dealEstateMap/' + id,
    method: 'get'
  })
}

// 查询产业地图详细并且带记录
export function getInfoById(id, mode) {
  return request({
    url: '/map/dealEstateMap/getInfoById?id=' + id + '&mode=' + mode,
    method: 'get'
  })
}

// 保存产业地图
export function saveDealEstateMap(data) {
  return request({
    url: '/map/dealEstateMap/save',
    method: 'post',
    data: data
  })
}

// 保存产业地图Json
export function saveDealEstateMapJson(data) {
  return request({
    url: '/map/dealEstateMap/saveJson',
    method: 'post',
    data: data
  })
}

// 分享产业地图
export function shareData(data) {
  return request({
    url: '/map/dealEstateMap/shareData',
    method: 'post',
    data: data
  })
}

// 删除产业地图
export function delDealEstateMap(id) {
  return request({
    url: '/map/dealEstateMap/' + id,
    method: 'delete'
  })
}

// 手动锁定/解锁产业地图
export function operateInfo(id, isLock) {
  return request({
    url: '/map/dealEstateMap/operate/' + id + '/' + isLock,
    method: 'post'
  })
}
// 自动锁定产业地图
export function lockOperate(id) {
  return request({
    url: '/map/dealEstateMap/lockOperate/' + id,
    method: 'post'
  })
}

// 自动解锁产业地图
export function unlockOperate(id) {
  return request({
    url: '/map/dealEstateMap/unlockOperate/' + id,
    method: 'post'
  })
}

// 导出产业地图
export function exportDealEstateMap(query) {
  return request({
    url: '/map/dealEstateMap/export',
    method: 'get',
    params: query
  })
}

// 查询产业地图操作日志列表
export function listDealEstateMapLog(query) {
  return request({
    url: '/map/dealEstateMap/logInfo',
    method: 'get',
    params: query
  })
}
